/**
 * 终端设备类型
 */
export const deviceTypeSelect = [
  {
    value: 1,
    label: "4G"
  },
  {
    value: 2,
    label: "4G+DSM+ADAS"
  },
  {
    value: 3,
    label: "2G"
  }
];

/**
 * 车牌颜色
 */
export const plateColorSelect = [
  {
    value: 1,
    label: "蓝色"
  },
  {
    value: 2,
    label: "黄色"
  },
  {
    value: 3,
    label: "黑色"
  },
  {
    value: 4,
    label: "白色"
  },
  {
    value: 5,
    label: "绿色"
  },
  {
    value: 9,
    label: "黄色"
  }
];
/**
 * 车辆类型
 */
export const carTypeSelect = [
  {
    value: 10,
    label: "客车"
  },
  {
    value: 11,
    label: "大型客车"
  },
  {
    value: 12,
    label: "中型客车"
  },
  {
    value: 13,
    label: "小型客车"
  },
  {
    value: 14,
    label: "轿车"
  },
  {
    value: 15,
    label: "大型卧铺客车"
  },
  {
    value: 16,
    label: "中型卧铺客车"
  },
  {
    value: 20,
    label: "普通货车"
  },
  {
    value: 21,
    label: "大型普通货车"
  },
  {
    value: 22,
    label: "中普货"
  },
  {
    value: 23,
    label: "小普货"
  },
  {
    value: 30,
    label: "专用运输车"
  },
  {
    value: 31,
    label: "集装箱车"
  },
  {
    value: 32,
    label: "大件运输车"
  },
  {
    value: 33,
    label: "保温冷藏车"
  },
  {
    value: 34,
    label: "商品车运输专业车辆"
  },
  {
    value: 35,
    label: "罐车"
  },
  {
    value: 36,
    label: "牵引车"
  },
  {
    value: 37,
    label: "挂车"
  },
  {
    value: 38,
    label: "平板车"
  },
  {
    value: 39,
    label: "其他专用车"
  },
  {
    value: 40,
    label: "危险品运输车"
  },
  {
    value: 50,
    label: "农用车"
  },
  {
    value: 60,
    label: "拖拉机"
  },
  {
    value: 90,
    label: "其他车辆"
  }
];

/**
 * 车辆运营状态
 */
export const carStateSelect = [
  {
    value: 1,
    label: "运营"
  },
  {
    value: 2,
    label: "停运"
  },
  {
    value: 3,
    label: "未审核"
  },
  {
    value: 4,
    label: "已入网"
  },
  {
    value: 9,
    label: "注销"
  }
];

/**
 * 运营类型
 */
export const operationTypeSelect = [
  {
    value: 1,
    label: "班线客运"
  },
  {
    value: 2,
    label: "旅游客运"
  },
  {
    value: 3,
    label: "危险货物运输"
  },
  {
    value: 4,
    label: "普通货运"
  }
];

/**
 * 转发协议
 */
export const retransmissionProtocolSelect = [
  {
    value: 1,
    label: "809协议"
  },
  {
    value: 2,
    label: "808协议"
  }
];

/**
 * 油耗仪类型
 */
export const fuelTypeSelect = [
  {
    value: 1,
    label: "车辆油耗仪"
  },
  {
    value: 2,
    label: "机械设备油耗仪"
  }
];

/**
 * 经营范围
 */
export const businessScopeSelect = [
  {
    value: 1,
    label: "客运"
  },
  {
    value: 2,
    label: "危险货物运输"
  },
  {
    value: 3,
    label: "普通运输"
  }
];

/**
 * 加油类型
 */
export const refuelTypeSelect = [
  {
    value: 1,
    label: "柴油"
  },
  {
    value: 2,
    label: "0#"
  },
  {
    value: 3,
    label: "92#"
  },
  {
    value: 4,
    label: "93#"
  }
];

/**
 * 车身颜色
 */
export const carcolorSelect = [
  {
    value: 1,
    label: "蓝色"
  },
  {
    value: 2,
    label: "黄色"
  },
  {
    value: 3,
    label: "黑色"
  },
  {
    value: 4,
    label: "白色"
  },
  {
    value: 5,
    label: "绿色"
  },
  {
    value: 9,
    label: "黄色"
  }
];

/**
 * send-down commandType
 */
export const sendDownCommandTypeSelect = [
  {
    value: 8103,
    label: "设置终端参数"
  },
  {
    value: 8104,
    label: "查询终端参数"
  },
  {
    value: 8106,
    label: "查询指定终端参数"
  },
  {
    value: 8107,
    label: "查询终端属性"
  },
  {
    value: 8201,
    label: "位置信息查询"
  },
  {
    value: 8202,
    label: "临时位置跟踪控制"
  },
  {
    value: 8203,
    label: "人工确认报警消息"
  },
  {
    value: 8300,
    label: "文本信息下发"
  },
  {
    value: 8302,
    label: "提问下发"
  },
  {
    value: 8702,
    label: "上报驾驶员身份信息请求"
  },
  {
    value: 8801,
    label: "摄像头立即拍摄命令"
  },
  {
    value: 8400,
    label: "电话回拨"
  },
  {
    value: 8401,
    label: "设置电话本"
  },
  {
    value: 8500,
    label: "车辆控制"
  },
  {
    value: 8105,
    label: "终端控制"
  },
  {
    value: 8303,
    label: "信息点播菜单设置"
  },
  {
    value: 8600,
    label: "设置圆形区域"
  },
  {
    value: 8601,
    label: "删除圆形区域"
  },
  {
    value: 8602,
    label: "设置矩形区域"
  },
  {
    value: 8603,
    label: "删除矩形区域"
  },
  {
    value: 8604,
    label: "设置多边形区域"
  },
  {
    value: 8605,
    label: "删除多边形区域"
  },
  {
    value: 8606,
    label: "设置路线"
  },
  {
    value: 8607,
    label: "删除路线"
  },
  {
    value: 8301,
    label: "事件设置"
  },
  {
    value: 8304,
    label: "信息服务"
  },
  {
    value: 8804,
    label: "录音开始命令"
  },
  {
    value: 8702,
    label: "上报驾驶员身份信息请求"
  },
  {
    value: 9003,
    label: "查询终端音视频属性"
  }
];

/**
 * send-up commandType
 */
export const sendUpCommandTypeSelect = [
  {
    value: 1301,
    label: "平台查岗应答"
  }
];

/**
 * 事件处理结果
 */
export const dealResultSelect = [
  {
    value: 1,
    label: "有效警情"
  },
  {
    value: 2,
    label: "无效警情"
  }
];
/**
 * 报警状态
 */
export const alarmStatusSelect = [
  {
    value: 1,
    label: "预警"
  },
  {
    value: 2,
    label: "报警"
  }
];
/**
 * 事件状态
 */
export const eventStatusSelect = [
  {
    value: 1,
    label: "未纠正"
  },
  {
    value: 2,
    label: "已纠正"
  }
];

/**
 * 事件处理方式
 */
export const dealMethodRadio = [
  {
    value: 1,
    label: "语音播报"
  },
  {
    value: 2,
    label: "发送短信"
  },
  {
    value: 3,
    label: "APP推送"
  },
  {
    value: 4,
    label: "电话记录"
  }
];

/**
 * 企业状态
 * @type {*[]}
 */
export const enterpriseStatus = [
  {
    value: 1,
    label: "营业"
  },
  {
    value: 2,
    label: "停业"
  },
  {
    value: 3,
    label: "整改"
  },
  {
    value: 4,
    label: "停业整顿"
  },
  {
    value: 5,
    label: "歇业"
  },
  {
    value: 6,
    label: "注销"
  }
];

/**
 * 企业类型
 * @type {*[]}
 */
export const enterpriseType = [
  {
    value: 1,
    label: "企业"
  },
  {
    value: 2,
    label: "个人"
  }
];

export const normalDict = [
  {
    value: "true",
    label: "正常"
  },
  {
    value: "false",
    label: "禁用"
  }
];

export const fenceDict = [
  {
    value: 1,
    label: "圆形"
  },
  {
    value: 2,
    label: "矩形"
  },
  {
    value: 3,
    label: "多边形"
  }
];

/*
 * 规则类型
 */
export const ruleTypeList = [
  {
    value: 1,
    label: "超速"
  },
  {
    value: 2,
    label: "疲劳"
  },
  {
    value: 3,
    label: "区域"
  },
  {
    value: 4,
    label: "超时停车"
  },
  {
    value: 5,
    label: "道路等级限速"
  },
  {
    value: 6,
    label: "关键点规则"
  },
  {
    value: 7,
    label: "路线路段规则"
  },
  {
    value: 8,
    label: "限行规则"
  },
  {
    value: 9,
    label: "车辆异常规则"
  }
  // 1=超速，2=疲劳，3=区域，4=超时停车，5=道路等级限速，6=关键点规则，7=路线路段规则，8=限行规则，9=车辆异常规则
];

export const areaTypeList = [
  {
    value: 0,
    label: "不限定"
  },
  {
    value: 1,
    label: "自定义区域"
  },
  {
    value: 2,
    label: "线路"
  }

  // 0=不限定 1=自定义区域 2=线路
];

/**
 * 区域规则中的区域类型
 * @type {*[]}
 */
export const areaTypeList2 = [
  {
    value: 1,
    label: "自定义区域"
  }
];

/**
 * 风险等级
 * @type {*[]}
 */
export const riskLevelList = [
  {
    value: 1,
    label: "无风险"
  },
  {
    value: 2,
    label: "低风险"
  },
  {
    value: 3,
    label: "中风险"
  },
  {
    value: 4,
    label: "高风险"
  }
];

/**
 * 扣分系数列表
 * @type {*[]}
 */
export const scoreList = [
  {
    value: 0,
    label: "0"
  },
  {
    value: 1,
    label: "1"
  },
  {
    value: 2,
    label: "2"
  },
  {
    value: 3,
    label: "3"
  },
  {
    value: 4,
    label: "4"
  },
  {
    value: 5,
    label: "5"
  }
];

/**
 * 区域类别
 * @type {*[]}
 */
export const areaStyleDict = [
  {
    value: 1,
    label: "村庄"
  },
  {
    value: 2,
    label: "工业园区"
  },
  {
    value: 3,
    label: "物流园区"
  },
  {
    value: 4,
    label: "其他"
  }
];

/**
 * 超速限速
 * @type {*[]}
 */
export const speedLimitList = [
  {
    value: 30,
    label: 30
  },
  {
    value: 40,
    label: 40
  },
  {
    value: 50,
    label: 50
  },
  {
    value: 60,
    label: 60
  },
  {
    value: 70,
    label: 70
  },
  {
    value: 80,
    label: 80
  },
  {
    value: 90,
    label: 90
  },
  {
    value: 100,
    label: 100
  },
  {
    value: 110,
    label: 110
  },
  {
    value: 120,
    label: 120
  }
];

/**
 * 疲劳限速
 * @type {*[]}
 */
export const speedLimitList2 = [
  {
    value: 10,
    label: 10
  },
  {
    value: 20,
    label: 20
  },
  {
    value: 30,
    label: 30
  },
  {
    value: 40,
    label: 40
  },
  {
    value: 50,
    label: 50
  },
  {
    value: 60,
    label: 60
  },
  {
    value: 70,
    label: 70
  },
  {
    value: 80,
    label: 80
  }
];

export const keepTimeList = [
  {
    value: 60,
    label: 60
  },
  {
    value: 120,
    label: 120
  },
  {
    value: 180,
    label: 180
  },
  {
    value: 300,
    label: 300
  },
  {
    value: 600,
    label: 600
  },
  {
    value: 1200,
    label: 1200
  }
];

/**
 * 疲劳持续时间
 * @type {*[]}
 */
export const tiredTimeList = [
  {
    value: 10,
    label: 10
  },
  {
    value: 30,
    label: 30
  },
  {
    value: 60,
    label: 60
  },
  {
    value: 90,
    label: 90
  },
  {
    value: 120,
    label: 120
  },
  {
    value: 180,
    label: 180
  },
  {
    value: 240,
    label: 240
  },
  {
    value: 300,
    label: 300
  },
  {
    value: 480,
    label: 480
  }
];

/**
 * 休息时长
 * @type {*[]}
 */
export const restTimeList = [
  {
    value: 20,
    label: 20
  },
  {
    value: 30,
    label: 30
  },
  {
    value: 60,
    label: 60
  },
  {
    value: 90,
    label: 90
  },
  {
    value: 120,
    label: 120
  },
  {
    value: 180,
    label: 180
  },
  {
    value: 240,
    label: 240
  }
];

/**
 * 最后GPS车速
 * @type {*[]}
 */
export const lastGPSSpeedList = [
  {
    value: 0,
    label: 0
  },
  {
    value: 1,
    label: 1
  },
  {
    value: 2,
    label: 2
  },
  {
    value: 3,
    label: 3
  },
  {
    value: 5,
    label: 5
  },
  {
    value: 10,
    label: 10
  },
  {
    value: 20,
    label: 20
  },
  {
    value: 30,
    label: 30
  }
];

export const dealTypeList = [
  {
    value: 1,
    label: "人工"
  },
  {
    value: 2,
    label: "自动"
  }
];

export const alertTypeList = [
  {
    value: 1,
    label: "常用警报"
  },
  {
    value: 2,
    label: "司机状态警报"
  },
  {
    value: 3,
    label: "车辆状态警报"
  },
  {
    value: 4,
    label: "盲区警报"
  },
  {
    value: 5,
    label: "设备故障警报"
  },
  {
    value: 6,
    label: "高级驾驶辅助警报"
  },
  {
    value: 7,
    label: "区域警报"
  }
];

export const alarmCodeList = [
  {
    value: "0",
    label: "紧急报警"
  },
  {
    value: "1",
    label: "超速报警"
  },
  {
    value: "2",
    label: "疲劳驾驶"
  },
  {
    value: "3",
    label: "危险预警"
  },
  {
    value: "4",
    label: "GNSS 模块发生故障"
  },
  {
    value: "5",
    label: "GNSS 天线未接或被剪断"
  },
  {
    value: "6",
    label: "紧急报警"
  },
  {
    value: "7",
    label: "终端主电源欠压"
  },
  {
    value: "8",
    label: "终端主电源掉电"
  },
  {
    value: "9",
    label: "终端 LCD 或显示器故障"
  },
  {
    value: "10",
    label: "TTS 模块故障"
  },
  {
    value: "11",
    label: "摄像头故障"
  },
  {
    value: "12",
    label: "道路运输证 IC 卡模块故障"
  },
  {
    value: "13",
    label: "超速预警"
  },
  {
    value: "14",
    label: "疲劳驾驶预警"
  },
  {
    value: "15",
    label: "预留"
  },
  {
    value: "16",
    label: "预留"
  },
  {
    value: "17",
    label: "预留"
  },
  {
    value: "18",
    label: "当天累计驾驶超时"
  },
  {
    value: "19",
    label: "超时停车"
  },
  {
    value: "20",
    label: "进出区域"
  },
  {
    value: "21",
    label: "进出路线"
  },
  {
    value: "22",
    label: "路段行驶时间不足/过长"
  },
  {
    value: "23",
    label: "路线偏离报警"
  },
  {
    value: "24",
    label: "车辆 VSS 故障"
  },
  {
    value: "25",
    label: "车辆油量异常"
  },
  {
    value: "26",
    label: "车辆被盗(通过车辆防盗器)"
  },
  {
    value: "27",
    label: "车辆非法点火"
  },
  {
    value: "28",
    label: "车辆非法位移"
  },
  {
    value: "29",
    label: "碰撞预警"
  },
  {
    value: "30",
    label: "侧翻预警"
  },
  {
    value: "31",
    label: "非法开门报警(终端未设置区域时，不 判断非法开门)"
  }
];

export const getPayStatus = status => {
  if (status == 1) {
    return "待付款";
  } else if (status == 2) {
    return "已付款";
  } else if (status == 3) {
    return "已取消";
  } else {
    return "";
  }
};

export const getPayStatusColor = status => {
  if (status == 1) {
    return "primary";
  } else if (status == 2) {
    return "success";
  } else if (status == 3) {
    return "error";
  } else {
    return "default";
  }
};
